package com.pingan.haofang.searchcloud.monitor.constants;

public class MonitorIndicator {
    /**
     * 索引id
     */
    public static final String INDEX_ID = "indexId";
    /**
     * 索引名称
     */
    public static final String INDEX_NAME = "indexName";
    /**
     * 项目id
     */
    public static final String PROJECT_ID = "projectId";
    /**
     * 项目名称
     */
    public static final String PROJECT_NAME = "projectName";

    /**
     * 索引构建监控指标
     */
    public static class INDEX {
        /**
         * 单条索引平均耗时
         */
        public static final String RECORD_COST = "recordCost";
        /**
         * 索引耗时
         */
        public static final String INDEX_COST = "indexCost";
        /**
         * 成功率
         */
        public static final String SUCCESS_RATE = "successRate";
    }

    /**
     * API调用监控指标
     */
    public static class API {
        /**
         * 响应时间
         */
        public static final String RECORD_COST = "recordCost";

        /**
         * 10分钟内，超过1000ms的响应次数
         */
        public static final String WARNING_NUM = "warningNum";

    }

    /**
     * 硬件监控指标
     */
    public static class HARDWARE {
        /**
         * 硬盘使用率
         */
        public static final String DISK_OCCUPANCY_RATE = "diskOccupancyRate";
        /**
         * solr节点健康率
         */
        public static final String SOLR_HEALTH_RATE = "sorlHealthRate";
    }

    /**
     * API视图指标
     */
    public static class API_CHART {
        /**
         * 调用量
         */
        public static final String INVOKE_COUNT = "invokeCount";
        /**
         * 平响
         */
        public static final String AVG_DURATION = "avgDuration";
    }

}
